/**
 *Copyright (c) 2003, 2018, UMF and/or its affiliates. All rights reserved.
 */
package com.umf.b2b.model.pay;

import com.umf.b2b.MerchantBaseRequest;
import com.umpay.dto.UMFResponse.Message.Link;
import com.umpay.util.UMFUtil;

import java.util.ArrayList;
import java.util.List;

/**
<p>Title:PaymentEbank</p>  
<p>Description:����֧��</p>
 */
public class PaymentEbank extends MerchantBaseRequest{
	
	private String notify_url;
	private String ret_url;//*����ش� ǰ̨ҳ�淵�ص�ַ,�ͻ�֧����ɺ�ǰ̨�ɹ�������ת�ĵ�ַ
	private String trade_no;//*����ش� [��Ӧ����]������ˮ��
	private String mer_trace;//*����ش� [��Ӧ����]�̻���ˮ��
	private String pay_type;//*����ش� ֧����ʽ B2BBANK��B2B������B2CBANK��B2C������B2CDEBITBANK��B2C����������ǿ���
	private String gate_id;//*����ش� ���п��ķ����У���������б�
	private String amount;//*����ش� [��Ӧ����]֧�����
	private String remark;//��ע��Ϣ
	private String url = "/payment/ebank";
	
	private String order_id;//*��Ӧ���� �̻��µ�ʱ�ύ��order_id
	private String mer_check_date;//*��Ӧ���� ƽ̨�������ڣ���ʽ��YYYYMMDD
	
	@Override
	public String getRequestUrl() {
		return baseUrl + url;
	}

	@Override
	public PaymentEbank doRequest() throws Exception {
		String url = UMFUtil.getRedirectUrlPost(createAPIContext(), this);
		PaymentEbank paymentEbank = new PaymentEbank();
		List<Link> links = new ArrayList<Link>();
		Link link = new Link();
		link.setUrl(url);
		links.add(link);
		paymentEbank.setLinks(links);
		return paymentEbank;
	}

	public String getMer_id() {
		return mer_id;
	}

	public void setMer_id(String mer_id) {
		this.mer_id = mer_id;
	}

	public String getNotify_url() {
		return notify_url;
	}

	public void setNotify_url(String notify_url) {
		this.notify_url = notify_url;
	}

	public String getMer_trace() {
		return mer_trace;
	}

	public void setMer_trace(String mer_trace) {
		this.mer_trace = mer_trace;
	}

	public String getTrade_no() {
		return trade_no;
	}

	public void setTrade_no(String trade_no) {
		this.trade_no = trade_no;
	}

	public String getAmount() {
		return amount;
	}

	public void setAmount(String amount) {
		this.amount = amount;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getGate_id() {
		return gate_id;
	}

	public void setGate_id(String gate_id) {
		this.gate_id = gate_id;
	}

	public String getRet_url() {
		return ret_url;
	}

	public void setRet_url(String ret_url) {
		this.ret_url = ret_url;
	}

	public String getPay_type() {
		return pay_type;
	}

	public void setPay_type(String pay_type) {
		this.pay_type = pay_type;
	}

	public String getOrder_id() {
		return order_id;
	}

	public void setOrder_id(String order_id) {
		this.order_id = order_id;
	}

	public String getMer_check_date() {
		return mer_check_date;
	}

	public void setMer_check_date(String mer_check_date) {
		this.mer_check_date = mer_check_date;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("PaymentEbank [notify_url=");
		builder.append(notify_url);
		builder.append(", ret_url=");
		builder.append(ret_url);
		builder.append(", trade_no=");
		builder.append(trade_no);
		builder.append(", mer_trace=");
		builder.append(mer_trace);
		builder.append(", pay_type=");
		builder.append(pay_type);
		builder.append(", gate_id=");
		builder.append(gate_id);
		builder.append(", amount=");
		builder.append(amount);
		builder.append(", remark=");
		builder.append(remark);
		builder.append(", url=");
		builder.append(url);
		builder.append(", order_id=");
		builder.append(order_id);
		builder.append(", mer_check_date=");
		builder.append(mer_check_date);
		builder.append(", version=");
		builder.append(version);
		builder.append(", mer_id=");
		builder.append(mer_id);
		builder.append(", ret_code=");
		builder.append(ret_code);
		builder.append(", ret_msg=");
		builder.append(ret_msg);
		builder.append(", links=");
		builder.append(links);
		builder.append("]");
		return builder.toString();
	}

}
